Repository navigation
Async roadmap T-001 + T-003: structured suspend detection and pipeline smoke CI - #4
Merged
Merged
Conversation
T-003: replace the debug-string `Poll::Pending` heuristic with structured checks (SetDiscriminant / Aggregate(Adt) / constant variant DefId and discriminant bits matched against the Poll ADT), still gated by tcx.is_coroutine so sync code paths are untouched. T-001: add scripts/smoke.sh, which builds pn, analyzes the benchmark crates, and asserts deadlock bug counts plus async lock-group counts (async-deadlock: 1 bug / 2 groups; new async-no-deadlock false-positive guard: 0 bugs / 1 group; six sync regression baselines). The script runs in CI via .github/workflows/smoke.yml. Also translate the remaining Chinese comments and docs to English (todolist.md, src/memory/pta/builder.rs).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Focused, verifiable slice of the async roadmap (
todolist.md): completes T-003 (version-robust suspend detection) and T-001 (CI regression testing), with no changes to sync code paths.T-003 — structured suspend detection
block_sets_poll_pendingno longer relies on the debug-string rendering of_0 = Poll::Pending(which only worked becauseDefId'sDebugoutput embeds the path). It now:Pendingvariant of the body's return type structurally (aPoll-shaped enum: has bothReadyandPendingvariants by name);_0-writing statement in the block against that variant index:SetDiscriminant { _0, v }_0 = Aggregate(Adt(.., v, ..))_0 = const— unevaluated consts matched by variantDefId, evaluated consts matched by discriminant bit pattern againstadt_def.discriminants;_0write decide.Still gated by
tcx.is_coroutine, so sync bodies never enter this path (verified:intraandcondvar-closurecounts identical tomain).T-001 — CI regression / smoke tests
scripts/smoke.sh: buildspn, analyzes benchmark crates, asserts the deadlock reportBug countand (for async cases) the[lockgroup-detail]lock-group count..github/workflows/smoke.yml: runs the script on push / pull_request tomain(toolchain pinned byrust-toolchain.toml). The async assertions double as the toolchain-upgrade compatibility test required by T-003.bench/deadlock/async-no-deadlock(two tasks sharing one mutex across.await): asserts 0 bugs / 1 lock group, complementingasync-deadlock(1 bug / 2 lock groups).intra/inter/conflict-inter/lock-closure/static-ref/condvar-closure= 4/4/1/1/1/6) are asserted in the same script, matching the "counts unchanged" engineering constraint.select!,tokio::sync::Mutex, timeout variants) are intentionally deferred to T-002/T-006 — asserting on unmodeled paths today would produce a false green signal.Housekeeping
todolist.mdrewritten fully in English;src/memory/pta/builder.rscomments).tmp/added to.gitignore(analysis artifacts fromdetect.sh/smoke.sh).Verification
cargo buildclean;cargo test55/55 pass../scripts/smoke.sh: all 8 cases PASS locally (async-deadlock 1/2, async-no-deadlock 0/1, six sync baselines).[async] structured suspend detection matched …) during async-deadlock analysis.